<?php

use Phinx\Migration\AbstractMigration;

class AddColumnTypeInStepCategoryTable extends AbstractMigration
{
    public function up()
    {
        $this->table("step_category")
            ->addColumn('is_standard', 'enum', ['values' => 'yes,no', 'default' => 'yes', 'comment' => ' 是否是标准项目模块'])
            ->addColumn('task_type', 'enum', ['values' => 'free,inventory,episodes', 'default' => 'inventory', 'comment' => ' 任务类型,自由任务、清单任务、集数任务'])
            ->save();
    }

    public function down()
    {
        $this->table("step_category")
            ->removeColumn("is_standard")
            ->removeColumn("task_type")
            ->save();
    }
}
